# FROM nginx
# COPY dist/  /usr/share/nginx/html/
# COPY nginx/default.conf /etc/nginx/conf.d/default.conf

FROM node:14.15.1

ADD _web /blog
WORKDIR /blog

# ENV NODE_ENV=production
# ENV HOST 0.0.0.0

RUN npm install
RUN npm run build



CMD [ "npm", "run", "start" ]



# # 设置基础镜像
# FROM nginx
# # 将dist文件中的内容复制到 /usr/share/nginx/html/ 这个目录下面
# COPY dist/  /usr/share/nginx/html/
# #用本地的 default.conf 配置来替换nginx镜像里的默认配置
# COPY nginx/default.conf /etc/nginx/conf.d/default.conf
